package com.zhiyi.coco.service.impl;

import com.zhiyi.coco.dao.MaterialMapper;
import com.zhiyi.coco.entity.Material;
import com.zhiyi.coco.service.MaterialService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
@Log4j
public class MaterialServiceImpl implements MaterialService {
    @Autowired
    private MaterialMapper materialMapper;

    @Override
    public Integer insertSelective(Material material) {
        return materialMapper.insertSelective(material);
    }

    @Override
    public Integer deleteByfId(Integer fId) {
        return materialMapper.deleteByfId(fId);
    }

    @Override
    public List<Material>
    getAllNoParam() {
        return materialMapper.getAllNoParam();
    }

    @Override
    public List<Material> getAll(Integer fId) {
        return materialMapper.getAll(fId);
    }
}
